#include "fanc.h"

int main()
{
	InitContact();
	int num = 1;
	struct Cont cont[MAX] = {  };
	int count = 0;

	cout << "选择功能" << endl;
	
	while (num)
	{
		cin >> num;
		switch (num)
		{
		case 1:
			//cout << "1" << endl;
			count = Add_contacter(cont,count);
			break;
		case 2:
			Show_contacter(cont, count);
			//cout << "2" << endl;
			break;
		case 3:
			count = Delete_contacter(cont, count);
			//cout << "3" << endl;
			break;
		case 4:
			Search_contacter(cont ,count);
			//cout << "4" << endl;
			break;
		case 5:
			Mod_contacter(cont, count);
			//cout << "5" << endl;
			break;
		case 6:
			count = Clear_contacter(count);
			//cout << "6" << endl;
			break;
		case 0:
			exit(0);
			//cout << "0" << endl;
			break;
		default:
			cout << "选错重新输入,退出请按0" << endl;
			break;
		}

	}
	
	return 0;
}